package scauCmiScaffolding.compiled;

import org.eclipse.jet.JET2Context;
import org.eclipse.jet.JET2Template;
import org.eclipse.jet.JET2Writer;
import org.eclipse.jet.taglib.RuntimeTagElement;
import org.eclipse.jet.taglib.TagInfo;

public class _jet_findEntityByPrimaryKey_2 implements JET2Template {
    private static final String _jetns_c = "org.eclipse.jet.controlTags"; //$NON-NLS-1$
    private static final String _jetns_java = "org.eclipse.jet.javaTags"; //$NON-NLS-1$

    public _jet_findEntityByPrimaryKey_2() {
        super();
    }

    private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
    
    private static final TagInfo _td_java_format_1_1 = new TagInfo("java:format", //$NON-NLS-1$
            1, 1,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_setVariable_2_1 = new TagInfo("c:setVariable", //$NON-NLS-1$
            2, 1,
            new String[] {
                "select", //$NON-NLS-1$
                "var", //$NON-NLS-1$
            },
            new String[] {
                "$eachTable/primaryKeys/@count", //$NON-NLS-1$
                "countPriKeys", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_4_9 = new TagInfo("c:get", //$NON-NLS-1$
            4, 9,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_4_64 = new TagInfo("c:get", //$NON-NLS-1$
            4, 64,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_iterate_4_127 = new TagInfo("c:iterate", //$NON-NLS-1$
            4, 127,
            new String[] {
                "select", //$NON-NLS-1$
                "var", //$NON-NLS-1$
            },
            new String[] {
                "$eachTable/primaryKeys/column", //$NON-NLS-1$
                "primaryKey", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_4_194 = new TagInfo("c:get", //$NON-NLS-1$
            4, 194,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "($primaryKey/@javaType)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_choose_4_237 = new TagInfo("c:choose", //$NON-NLS-1$
            4, 237,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_when_4_247 = new TagInfo("c:when", //$NON-NLS-1$
            4, 247,
            new String[] {
                "test", //$NON-NLS-1$
            },
            new String[] {
                "$primaryKey/@order=$countPriKeys", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_4_295 = new TagInfo("c:get", //$NON-NLS-1$
            4, 295,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lower-case($primaryKey/@field)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_otherwise_4_352 = new TagInfo("c:otherwise", //$NON-NLS-1$
            4, 352,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_get_4_365 = new TagInfo("c:get", //$NON-NLS-1$
            4, 365,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lower-case($primaryKey/@field)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_5_10 = new TagInfo("c:get", //$NON-NLS-1$
            5, 10,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lowercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_5_68 = new TagInfo("c:get", //$NON-NLS-1$
            5, 68,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_iterate_5_131 = new TagInfo("c:iterate", //$NON-NLS-1$
            5, 131,
            new String[] {
                "select", //$NON-NLS-1$
                "var", //$NON-NLS-1$
            },
            new String[] {
                "$eachTable/primaryKeys/column", //$NON-NLS-1$
                "primaryKey", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_choose_5_198 = new TagInfo("c:choose", //$NON-NLS-1$
            5, 198,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_when_5_208 = new TagInfo("c:when", //$NON-NLS-1$
            5, 208,
            new String[] {
                "test", //$NON-NLS-1$
            },
            new String[] {
                "$primaryKey/@order=$countPriKeys", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_5_256 = new TagInfo("c:get", //$NON-NLS-1$
            5, 256,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lower-case($primaryKey/@field)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_otherwise_5_313 = new TagInfo("c:otherwise", //$NON-NLS-1$
            5, 313,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_get_5_326 = new TagInfo("c:get", //$NON-NLS-1$
            5, 326,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lower-case($primaryKey/@field)", //$NON-NLS-1$
            } );

    public void generate(final JET2Context context, final JET2Writer __out) {
        JET2Writer out = __out;
        RuntimeTagElement _jettag_java_format_1_1 = context.getTagFactory().createRuntimeTag(_jetns_java, "format", "java:format", _td_java_format_1_1); //$NON-NLS-1$ //$NON-NLS-2$
        _jettag_java_format_1_1.setRuntimeParent(null);
        _jettag_java_format_1_1.setTagInfo(_td_java_format_1_1);
        _jettag_java_format_1_1.doStart(context, out);
        JET2Writer _jettag_java_format_1_1_saved_out = out;
        while (_jettag_java_format_1_1.okToProcessBody()) {
            out = out.newNestedContentWriter();
            out.write(NL);         
            RuntimeTagElement _jettag_c_setVariable_2_1 = context.getTagFactory().createRuntimeTag(_jetns_c, "setVariable", "c:setVariable", _td_c_setVariable_2_1); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_setVariable_2_1.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_setVariable_2_1.setTagInfo(_td_c_setVariable_2_1);
            _jettag_c_setVariable_2_1.doStart(context, out);
            _jettag_c_setVariable_2_1.doEnd();
            out.write("\t@Transactional");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\tpublic ");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_4_9 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_4_9); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_4_9.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_4_9.setTagInfo(_td_c_get_4_9);
            _jettag_c_get_4_9.doStart(context, out);
            _jettag_c_get_4_9.doEnd();
            out.write(" find");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_4_64 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_4_64); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_4_64.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_4_64.setTagInfo(_td_c_get_4_64);
            _jettag_c_get_4_64.doStart(context, out);
            _jettag_c_get_4_64.doEnd();
            out.write("ByPrimaryKey(");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_iterate_4_127 = context.getTagFactory().createRuntimeTag(_jetns_c, "iterate", "c:iterate", _td_c_iterate_4_127); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_iterate_4_127.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_iterate_4_127.setTagInfo(_td_c_iterate_4_127);
            _jettag_c_iterate_4_127.doStart(context, out);
            while (_jettag_c_iterate_4_127.okToProcessBody()) {
                RuntimeTagElement _jettag_c_get_4_194 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_4_194); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_4_194.setRuntimeParent(_jettag_c_iterate_4_127);
                _jettag_c_get_4_194.setTagInfo(_td_c_get_4_194);
                _jettag_c_get_4_194.doStart(context, out);
                _jettag_c_get_4_194.doEnd();
                out.write("  ");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_choose_4_237 = context.getTagFactory().createRuntimeTag(_jetns_c, "choose", "c:choose", _td_c_choose_4_237); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_choose_4_237.setRuntimeParent(_jettag_c_iterate_4_127);
                _jettag_c_choose_4_237.setTagInfo(_td_c_choose_4_237);
                _jettag_c_choose_4_237.doStart(context, out);
                JET2Writer _jettag_c_choose_4_237_saved_out = out;
                while (_jettag_c_choose_4_237.okToProcessBody()) {
                    out = out.newNestedContentWriter();
                    RuntimeTagElement _jettag_c_when_4_247 = context.getTagFactory().createRuntimeTag(_jetns_c, "when", "c:when", _td_c_when_4_247); //$NON-NLS-1$ //$NON-NLS-2$
                    _jettag_c_when_4_247.setRuntimeParent(_jettag_c_choose_4_237);
                    _jettag_c_when_4_247.setTagInfo(_td_c_when_4_247);
                    _jettag_c_when_4_247.doStart(context, out);
                    JET2Writer _jettag_c_when_4_247_saved_out = out;
                    while (_jettag_c_when_4_247.okToProcessBody()) {
                        out = out.newNestedContentWriter();
                        RuntimeTagElement _jettag_c_get_4_295 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_4_295); //$NON-NLS-1$ //$NON-NLS-2$
                        _jettag_c_get_4_295.setRuntimeParent(_jettag_c_when_4_247);
                        _jettag_c_get_4_295.setTagInfo(_td_c_get_4_295);
                        _jettag_c_get_4_295.doStart(context, out);
                        _jettag_c_get_4_295.doEnd();
                        _jettag_c_when_4_247.handleBodyContent(out);
                    }
                    out = _jettag_c_when_4_247_saved_out;
                    _jettag_c_when_4_247.doEnd();
                    RuntimeTagElement _jettag_c_otherwise_4_352 = context.getTagFactory().createRuntimeTag(_jetns_c, "otherwise", "c:otherwise", _td_c_otherwise_4_352); //$NON-NLS-1$ //$NON-NLS-2$
                    _jettag_c_otherwise_4_352.setRuntimeParent(_jettag_c_choose_4_237);
                    _jettag_c_otherwise_4_352.setTagInfo(_td_c_otherwise_4_352);
                    _jettag_c_otherwise_4_352.doStart(context, out);
                    JET2Writer _jettag_c_otherwise_4_352_saved_out = out;
                    while (_jettag_c_otherwise_4_352.okToProcessBody()) {
                        out = out.newNestedContentWriter();
                        RuntimeTagElement _jettag_c_get_4_365 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_4_365); //$NON-NLS-1$ //$NON-NLS-2$
                        _jettag_c_get_4_365.setRuntimeParent(_jettag_c_otherwise_4_352);
                        _jettag_c_get_4_365.setTagInfo(_td_c_get_4_365);
                        _jettag_c_get_4_365.doStart(context, out);
                        _jettag_c_get_4_365.doEnd();
                        out.write(",");  //$NON-NLS-1$        
                        _jettag_c_otherwise_4_352.handleBodyContent(out);
                    }
                    out = _jettag_c_otherwise_4_352_saved_out;
                    _jettag_c_otherwise_4_352.doEnd();
                    _jettag_c_choose_4_237.handleBodyContent(out);
                }
                out = _jettag_c_choose_4_237_saved_out;
                _jettag_c_choose_4_237.doEnd();
                _jettag_c_iterate_4_127.handleBodyContent(out);
            }
            _jettag_c_iterate_4_127.doEnd();
            out.write("){");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t\treturn ");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_5_10 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_5_10); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_5_10.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_5_10.setTagInfo(_td_c_get_5_10);
            _jettag_c_get_5_10.doStart(context, out);
            _jettag_c_get_5_10.doEnd();
            out.write("DAO.find");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_5_68 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_5_68); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_5_68.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_5_68.setTagInfo(_td_c_get_5_68);
            _jettag_c_get_5_68.doStart(context, out);
            _jettag_c_get_5_68.doEnd();
            out.write("ByPrimaryKey(");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_iterate_5_131 = context.getTagFactory().createRuntimeTag(_jetns_c, "iterate", "c:iterate", _td_c_iterate_5_131); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_iterate_5_131.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_iterate_5_131.setTagInfo(_td_c_iterate_5_131);
            _jettag_c_iterate_5_131.doStart(context, out);
            while (_jettag_c_iterate_5_131.okToProcessBody()) {
                RuntimeTagElement _jettag_c_choose_5_198 = context.getTagFactory().createRuntimeTag(_jetns_c, "choose", "c:choose", _td_c_choose_5_198); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_choose_5_198.setRuntimeParent(_jettag_c_iterate_5_131);
                _jettag_c_choose_5_198.setTagInfo(_td_c_choose_5_198);
                _jettag_c_choose_5_198.doStart(context, out);
                JET2Writer _jettag_c_choose_5_198_saved_out = out;
                while (_jettag_c_choose_5_198.okToProcessBody()) {
                    out = out.newNestedContentWriter();
                    RuntimeTagElement _jettag_c_when_5_208 = context.getTagFactory().createRuntimeTag(_jetns_c, "when", "c:when", _td_c_when_5_208); //$NON-NLS-1$ //$NON-NLS-2$
                    _jettag_c_when_5_208.setRuntimeParent(_jettag_c_choose_5_198);
                    _jettag_c_when_5_208.setTagInfo(_td_c_when_5_208);
                    _jettag_c_when_5_208.doStart(context, out);
                    JET2Writer _jettag_c_when_5_208_saved_out = out;
                    while (_jettag_c_when_5_208.okToProcessBody()) {
                        out = out.newNestedContentWriter();
                        RuntimeTagElement _jettag_c_get_5_256 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_5_256); //$NON-NLS-1$ //$NON-NLS-2$
                        _jettag_c_get_5_256.setRuntimeParent(_jettag_c_when_5_208);
                        _jettag_c_get_5_256.setTagInfo(_td_c_get_5_256);
                        _jettag_c_get_5_256.doStart(context, out);
                        _jettag_c_get_5_256.doEnd();
                        _jettag_c_when_5_208.handleBodyContent(out);
                    }
                    out = _jettag_c_when_5_208_saved_out;
                    _jettag_c_when_5_208.doEnd();
                    RuntimeTagElement _jettag_c_otherwise_5_313 = context.getTagFactory().createRuntimeTag(_jetns_c, "otherwise", "c:otherwise", _td_c_otherwise_5_313); //$NON-NLS-1$ //$NON-NLS-2$
                    _jettag_c_otherwise_5_313.setRuntimeParent(_jettag_c_choose_5_198);
                    _jettag_c_otherwise_5_313.setTagInfo(_td_c_otherwise_5_313);
                    _jettag_c_otherwise_5_313.doStart(context, out);
                    JET2Writer _jettag_c_otherwise_5_313_saved_out = out;
                    while (_jettag_c_otherwise_5_313.okToProcessBody()) {
                        out = out.newNestedContentWriter();
                        RuntimeTagElement _jettag_c_get_5_326 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_5_326); //$NON-NLS-1$ //$NON-NLS-2$
                        _jettag_c_get_5_326.setRuntimeParent(_jettag_c_otherwise_5_313);
                        _jettag_c_get_5_326.setTagInfo(_td_c_get_5_326);
                        _jettag_c_get_5_326.doStart(context, out);
                        _jettag_c_get_5_326.doEnd();
                        out.write(",");  //$NON-NLS-1$        
                        _jettag_c_otherwise_5_313.handleBodyContent(out);
                    }
                    out = _jettag_c_otherwise_5_313_saved_out;
                    _jettag_c_otherwise_5_313.doEnd();
                    _jettag_c_choose_5_198.handleBodyContent(out);
                }
                out = _jettag_c_choose_5_198_saved_out;
                _jettag_c_choose_5_198.doEnd();
                _jettag_c_iterate_5_131.handleBodyContent(out);
            }
            _jettag_c_iterate_5_131.doEnd();
            out.write(");");  //$NON-NLS-1$        
            out.write(NL);         
            out.write("\t}");  //$NON-NLS-1$        
            out.write(NL);         
            _jettag_java_format_1_1.handleBodyContent(out);
        }
        out = _jettag_java_format_1_1_saved_out;
        _jettag_java_format_1_1.doEnd();
    }
}
